package com.wb.iec104.run;

import com.wb.iec104.analysis.AnalysisIEC104;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Test {
    public static void main(String[] args) throws Exception {
        AnalysisIEC104 analysisIEC104=new AnalysisIEC104();
        //PropertiesUtils.TIME_END=1648699790691L;
       // String hexString="68 8c 7e  d  0  0  1 ff 14  1  1  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 80 80 80 80 80  1 80  1 80  1 80  0 80  0 80  0 80  0 80  0 80  0 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 81 81 81 81 81 81 81 81 81 81 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80";
       // hexString= HexConvert.strToString(hexString);
        analysisIEC104.analysis("68 FA 14 B0 00 00 24 10 03 01 01 00 20 41 00 B8 1E CD 42 00 21 C8 2F 0E 14 04 16 22 41 00 9A 99 19 3E 00 21 C8 2F 0E 14 04 16 23 41 00 D7 A3 CD 42 00 21 C8 2F 0E 14 04 16 80 41 00 D5 A3 8E 43 00 21 C8 2F 0E 14 04 16 81 41 00 85 E6 99 43 00 21 C8 2F 0E 14 04 16 82 41 00 72 5A B8 43 00 21 C8 2F 0E 14 04 16 83 41 00 A4 81 C1 43 00 21 C8 2F 0E 14 04 16 85 41 00 7E 99 7A 40 00 21 C8 2F 0E 14 04 16 86 41 00 AB 17 80 43 00 21 C8 2F 0E 14 04 16 87 41 00 A1 AD 88 42 00 21 C8 2F 0E 14 04 16 88 41 00 10 E6 7E 41 00 21 C8 2F 0E 14 04 16 8B 41 00 1C C7 51 BC 00 21 C8 2F 0E 14 04 16 8C 41 00 E4 F8 49 40 00 21 C8 2F 0E 14 04 16 8E 41 00 42 7B 39 3E 00 21 C8 2F 0E 14 04 16 8F 41 00 85 36 DB 3E 00 21 C8 2F 0E 14 04 16 93 41 00 00 00 18 42 00 21 C8 2F 0E 14 04 16");

        //byte[] data=new byte[]{104, -14, -46, 4, 0, 0, 13, 29, 3, 0, 1, 0, -2, 68, 0, -102, -103, 75, 66, 0, -1, 68, 0, 0, 0, 76, 66, 0, 0, 69, 0, -51, -52, 74, 66, 0, 4, 69, 0, 0, 0, 78, 66, 0, 7, 69, 0, 0, 0, 78, 66, 0, 10, 69, 0, 51, 51, 75, 66, 0, 11, 69, 0, -51, -52, 76, 66, 0, 15, 69, 0, 51, 51, 77, 66, 0, 17, 69, 0, 103, 102, 50, 66, 0, 19, 69, 0, 103, 102, 46, 66, 0, 20, 69, 0, 51, 51, 45, 66, 0, 21, 69, 0, 51, 51, 47, 66, 0, 22, 69, 0, 103, 102, 50, 66, 0, 38, 69, 0, -102, -103, 23, 66, 0, 41, 69, 0, 103, 102, 24, 66, 0, 45, 69, 0, -51, -52, -104, 65, 0, 48, 69, 0, -51, -52, -96, 65, 0, 50, 69, 0, 103, 102, -102, 65, 0, 52, 69, 0, 0, 0, -84, 65, 0, 54, 69, 0, 103, 102, -110, 65, 0, 61, 69, 0, 0, 0, -80, 65, 0, 65, 69, 0, 51, 51, -1, 65, 0, 66, 69, 0, -102, -103, 5, 66, 0, 69, 69, 0, 103, 102, 10, 66, 0, 70, 69, 0, 51, 51, -13, 65, 0, 74, 69, 0, -102, -103, 15, 66, 0, 79, 69, 0, 51, 51, 23, 66, 0, 81, 69, 0, -102, -103, 47, 66, 0, 84, 69, 0, 103,102, -6, 65, 0};
        //String strhexString= HexConvert.BinaryToHexString(data);
        //System.out.println("============"+strhexString);
        //System.out.println("============"+strhexString.replaceAll(" ",""));
       // analysisIEC104.analysis(HexConvert.strToString("68 ad 5e 7c  0  0 15 d0 14  1  1  0 51 40  0  2  0 10  0  2  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 13  1 5c  1 25  2 5a  1  3  0  3  0 27  1 4a  0  f  0  2  0 63  0  0  0  3  0  0  0  0  0  1  0 27  0 22  0 27  0 27  0 37  0 37  0 38  0 3a  0 34  0 35  0 35  0 34  0 1e  0 32  0 36  0 34  0  5  0  5  0  5  0  a  0  a  0  a  0 85  3 8b  3 8d  3  0  0  2  0  0  0  0  0  0  0  0  0  0  0  0  0  f  0  2  0 c1  0 78  0 1a  0 55  0 24 14  4  0  3  0  0  0  0  0  0  0 c1 bd  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0"));
    }


}
